package o;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class cjj {
    private cjr ˋ = null;
    private Activity ॱ;

    private cjj(Activity activity) {
        this.ॱ = activity;
    }

    public static cjj ˊ(Activity activity) {
        return new cjj(activity);
    }

    public <T> T ˏ() {
        Intent intent = this.ॱ.getIntent();
        if (intent == null) {
            return null;
        }
        Bundle bundleExtra = intent.getBundleExtra("_protocol");
        if (bundleExtra == null) {
            return null;
        }
        T ˎ = ˎ();
        new cjt().ॱ(bundleExtra, ˎ);
        return ˎ;
    }

    private <T> T ˎ() {
        try {
            return cjs.ˏ(this.ॱ.getClass()).newInstance();
        } catch (Exception e) {
            ckx.ˎ.ˊ("ContractActivityDelegat", "makeParam error: " + e.toString());
            return null;
        }
    }

    public void ˋ(Bundle bundle) {
        if (this.ˋ != null) {
            bundle.putBundle("Uikit:allocatorState", this.ˋ.ˋ(new Bundle()));
        }
    }

    public void ˊ(Bundle bundle) {
        Bundle bundle2 = bundle.getBundle("Uikit:allocatorState");
        if (bundle2 != null) {
            this.ˋ = new cjr();
            this.ˋ.ˎ(bundle2);
        }
    }

    public void ˊ() {
        if (this.ॱ.isFinishing() && this.ˋ != null) {
            this.ˋ.ॱ();
        }
    }
}
